<template>
    <div>
      <van-nav-bar
        title="订单信息"
      
        left-text="返回"
          @click-left="$router.go(-1)"
        
      />
      <van-collapse v-model="activeName" accordion v-for="v,k in arr"  :key="k"> 
          <van-collapse-item :title="v.order_time" :name="k">
              <div>
                  <van-cell-group>
                      <van-cell :title="v.user" icon="user-o" />
                      <van-cell :title="v.tel" icon="phone-o" />
                      <van-cell :title="v.address" icon="location-o" />
                      <van-cell :title="v.total_price" icon="gold-coin-o" />
                  </van-cell-group>
              </div>
  
              <div v-for="n,m in v.list" :key="m">
                  <van-card
           :price="n.price+'.00'"
           :desc="n.tintro"
           :title="n.tname"
           :thumb="n.fullSrc"
           @click-thumb="go(n)"
          ></van-card>
      </div>
              
              
          </van-collapse-item>
  
          
  
  </van-collapse>
  
  
  
    </div>
  </template>
  <script>
  import { orderData } from '@/api';
  export default {
      components: {},
      props: {},
      data() {
          return {
              activeName: '1',
              arr:[]
          };
      },
      computed: {},
      created() {},
      mounted() {
          this.getData(1,'2','1')
      },
      methods: {
          async getData(x,y,z){
              let res=await orderData({uid:x,pageSize:y,pageNumber:z})
              console.log(res);
              this.arr=res.data
          },
          go(v){// 去详情
           console.log(v);
          //  路由传参 
           this.$router.push("/det?tid="+v.tid)
           
        }
          
      },
      watch: {},
  };
  </script>
  <style scoped >
  </style>